package org.minproject.my_library_back.service;

import org.minproject.my_library_back.common.CommonResponse;
import org.minproject.my_library_back.domain.User;
import com.baomidou.mybatisplus.extension.service.IService;

/**
* @author Lenovo
* @description 针对表【user】的数据库操作Service
* @createDate 2024-11-21 09:11:46
*/
public interface UserService extends IService<User> {

    //根据userid和密码登录
    CommonResponse<User> login(String userid, String password);

    //注册
    CommonResponse<User> register(User user);

    //获取所有用户信息
    List<User> getAllUsers();

    //添加用户
    int addUser(User user);

    //根据id删除用户
    int deleteUser(int user_id);

    //修改用户
    int updateUser(User user);

    //根据id模糊查询用户
    List<User> getUsersByUserIdLike(int user_id);
}
